package homework.March_31;

import java.util.Scanner;

public class Solid_Diamond {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入菱形的边长：");
        int Side_length = sc.nextInt();
        int Side_length_double = Side_length * 2;

        for (int i = 0; i < Side_length_double; i++) {
            if (i <= Side_length) {
                for (int j = Side_length-i; j > 0; j--) {
                    System.out.print(" ");
                }
                for (int k = 0; k < i; k++) {
                    System.out.print("* ");
                }
            }else{
                for (int j = 0; j < i-Side_length; j++) {
                    System.out.print(" ");
                }
                for (int k = Side_length_double-i; k > 0; k--) {
                    System.out.print("* ");
                }
            }
            System.out.println("");
        }
    }
}
